﻿/*
 * 匹配模式
 */

void IsName(object obj)
{
    if (obj is int num)
    {
        
    }
    else if (obj is float f)
    {

    }
    else if (obj is double d)
    {

    }
}

void IsNameNew(object obj)
{
    switch (obj)
    {
        case int num: break;
        case float f: break;
        case double d: break;
    }
}